<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let name = '李华'
        let eat  = function(){
            console.log('吃饭了')
        }
        const person = {name,change}
        //等效于 const person = {name:name,change:change}
        console.log(person)

        //简化方法
        const person2 = {
            name,
            change,
            go(){
                console.log('走路')
            }
        } 
    </script>
</body>
</html>